package entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 用户表
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Schema(description = "用户表")
public class Users implements Serializable {

    //
    @Schema(description = "用户唯一标识（主键）")
    private Integer userId;

    @Schema(description = "登录账号（唯一）")
    private String username;

    @Schema(description = "加密存储的密码")
    @JsonIgnore
    private String password;

    @Schema(description = "用户角色ID")
    private int roleId;
    @Schema(description = "姓名")
    private String name;

    @Schema(description = "联系电话")
    private String phone;
    @Schema(description = "所属部门")
    private String department;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private LocalDateTime updateTime;
}
